package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.MaterialWarehouseUserDO;

import java.util.List;

@Mapper
public interface MaterialWarehouseUserMapper {
    int remove(@Param("materialsNo")String materialsNo,@Param("orgId")String orgId);

    int insert(MaterialWarehouseUserDO record);

    List<MaterialWarehouseUserDO> list(MaterialWarehouseUserDO record);

    int updateByPrimaryKeySelective(MaterialWarehouseUserDO record);

    int updateByPrimaryKey(MaterialWarehouseUserDO record);

    List<MaterialWarehouseUserDO> selectUserByWarehouse(@Param("orgId")String orgId,@Param("warehouseCode")String warehouseCode);

    List<MaterialWarehouseUserDO> findByMaterial(@Param("materialsNo")String materialsNo,@Param("orgId")String orgId);

    String userNameByLocation(@Param("orgId")String orgId,@Param("materialsNo")String materialsNo,@Param("warehouseCode") String warehouseCode,@Param("areaCode")String areaCode,@Param("locationCode")String locationCode);

    List<String> findByMaterialAndUserId(@Param("materialsNo")String materialsNo,@Param("orgId")String orgId,@Param("userId")String userId);
}